package com.wonders.hisdoctor.station.project.examine.mapper;

import com.wonders.hisdoctor.station.project.base.domain.OutpTreatRec;
import com.wonders.hisdoctor.station.project.examine.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 检查申请service实现
 *
 * @author zhanghaonan
 * <p>
 * Create: 2021-02-04
 */
@Mapper
@Repository
public interface ExamineMapper {

    /**
     * 查询检查申请项目菜单
     *
     * @param hospitalCode
     * @return
     */
    List<ExamineMenuVo> selectCheckMenu(@Param("hospitalCode") String hospitalCode);

    /**
     * 查询检查申请
     *
     * @param vo
     * @return
     */
    List<ExamItemsVo> selectItemList(ExamItemsRequestVo vo);

    /**
     * 查询检查申请单
     *
     * @param vo
     * @return
     */
    List<OutpTreatRecVo> selectOutpTreatRec(ExamineRequestVo vo);

    /**
     * 删除检查申请项目
     *
     * @param list
     * @return
     */
    int deleteOutpTreatRec(List<OutpTreatRec> list);

    /**
     * 删除检查医嘱明细
     *
     * @param list
     * @return
     */
    int deleteOutpTreatRecT(List<OutpTreatRec> list);

    /**
     * 删除检查项目记录表
     *
     * @param list
     * @return
     */
    int deleteExamItems(List<OutpTreatRec> list);

    /**
     * 查询历史检查申请
     *
     * @param vo
     * @return
     */
    List<OutpTreatRecVo> selectExamineHistory(ExamineHistoryRequestVo vo);

    /**
     * 查询处方明细表最大项目序号
     *
     * @param serialNo
     * @return
     */
    int selectMaxItemNo(@Param("serialNo") String serialNo);

    /**
     * 检查申请打印查询
     *
     * @param list
     * @return
     */
    List<PrintExamineVo> selectPrintExamine(List<OutpTreatRecVo> list);
}
